<template>
		<view class="my-search-container" :style="{background}">
			<view class="search" @click="clickSearch">
				<icon type="search" size="16" color="#000" />
				<text clsss="placeholder">搜索</text>
			</view>
		</view>
</template>

<script>
	export default {
		name: "my-search",
		props: {
			background: {
				type: String,
				default: '#c00000'
			}
		},
		data() {
			return {

			};
		},
		methods: {
			clickSearch() {
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss">
	.my-search-container {
		display: flex;
		align-items: center;
		height: 50px;
		padding: 0 10px;
		align-items: center;

		.search {
			display: flex;
			justify-content: center;
			align-items: center;
			width: 100%;
			background-color: #ffffff;
			border-radius: 18px;
			padding: 10px 0;

			text {
				font-size: 15px;
				margin-left: 5px;
			}
		}
	}
</style>
